using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
using Medianamik.UI.Web.Membership.Data;
using Medianamik.Core;
using Medianamik.Core.DAL;
using Medianamik.Core.Profile;
namespace Medianamik.DummyWebSite.Data{
    /// <summary>
    /// Strongly-typed collection for the UserProfile class.
    /// </summary>
    [Serializable]
    public partial class UserProfileCollection : ReadOnlyList<UserProfile, UserProfileCollection>, ICollectionWithChildren<UserProfileCollection, UserProfile>
    {        
        public UserProfileCollection() {}
        
        public UserProfileCollection LoadChildNodes(Guid pNodeId, string cultureName, bool pInclusive, int pMaxDepth, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
        public UserProfileCollection LoadParentNodes(Guid pNodeId, string cultureName, bool pInclusive, int pMaxDepth, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
        public UserProfileCollection Load(string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
        public IEnumerable<UserProfile> LoadByIDs(string ids, string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
        public IEnumerable<UserProfile> LoadByIDs(IList<Guid> ids, string cultureName, ContentState contentState, ActiveStatus status)
        {
            throw new NotImplementedException();
        }
    }
    /// <summary>
    /// This is  Read-only wrapper class for the vw_UserProfile view.
    /// </summary>
    [Serializable]
    public partial class UserProfile : ReadOnlyRecord<UserProfile>, IReadOnlyRecord, IUserProfile, IRecordBase
    {
    
	    #region Default Settings
	    protected static void SetSQLProps() 
	    {
		    GetTableSchema();
	    }
	    #endregion
        #region Schema Accessor
	    public static TableSchema.Table Schema
        {
            get
            {
                if (BaseSchema == null)
                {
                    SetSQLProps();
                }
                return BaseSchema;
            }
        }
    	
        private static void GetTableSchema() 
        {
            if(!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vw_UserProfile", TableType.View, DataService.GetInstance("CodeGenerationProvider"));
                schema.Columns = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns
                
                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName = "Id";
                colvarId.DataType = DbType.Guid;
                colvarId.MaxLength = 0;
                colvarId.AutoIncrement = false;
                colvarId.IsNullable = false;
                colvarId.IsPrimaryKey = false;
                colvarId.IsForeignKey = false;
                colvarId.IsReadOnly = false;
                
                schema.Columns.Add(colvarId);
                
                TableSchema.TableColumn colvarNodeId = new TableSchema.TableColumn(schema);
                colvarNodeId.ColumnName = "NodeId";
                colvarNodeId.DataType = DbType.Guid;
                colvarNodeId.MaxLength = 0;
                colvarNodeId.AutoIncrement = false;
                colvarNodeId.IsNullable = false;
                colvarNodeId.IsPrimaryKey = false;
                colvarNodeId.IsForeignKey = false;
                colvarNodeId.IsReadOnly = false;
                
                schema.Columns.Add(colvarNodeId);
                
                TableSchema.TableColumn colvarRevision = new TableSchema.TableColumn(schema);
                colvarRevision.ColumnName = "Revision";
                colvarRevision.DataType = DbType.Int32;
                colvarRevision.MaxLength = 0;
                colvarRevision.AutoIncrement = false;
                colvarRevision.IsNullable = true;
                colvarRevision.IsPrimaryKey = false;
                colvarRevision.IsForeignKey = false;
                colvarRevision.IsReadOnly = false;
                
                schema.Columns.Add(colvarRevision);
                
                TableSchema.TableColumn colvarCultureName = new TableSchema.TableColumn(schema);
                colvarCultureName.ColumnName = "CultureName";
                colvarCultureName.DataType = DbType.String;
                colvarCultureName.MaxLength = 10;
                colvarCultureName.AutoIncrement = false;
                colvarCultureName.IsNullable = false;
                colvarCultureName.IsPrimaryKey = false;
                colvarCultureName.IsForeignKey = false;
                colvarCultureName.IsReadOnly = false;
                
                schema.Columns.Add(colvarCultureName);
                
                TableSchema.TableColumn colvarIsActive = new TableSchema.TableColumn(schema);
                colvarIsActive.ColumnName = "IsActive";
                colvarIsActive.DataType = DbType.Boolean;
                colvarIsActive.MaxLength = 0;
                colvarIsActive.AutoIncrement = false;
                colvarIsActive.IsNullable = false;
                colvarIsActive.IsPrimaryKey = false;
                colvarIsActive.IsForeignKey = false;
                colvarIsActive.IsReadOnly = false;
                
                schema.Columns.Add(colvarIsActive);
                
                TableSchema.TableColumn colvarIsSubEntity = new TableSchema.TableColumn(schema);
                colvarIsSubEntity.ColumnName = "IsSubEntity";
                colvarIsSubEntity.DataType = DbType.Boolean;
                colvarIsSubEntity.MaxLength = 0;
                colvarIsSubEntity.AutoIncrement = false;
                colvarIsSubEntity.IsNullable = false;
                colvarIsSubEntity.IsPrimaryKey = false;
                colvarIsSubEntity.IsForeignKey = false;
                colvarIsSubEntity.IsReadOnly = false;
                
                schema.Columns.Add(colvarIsSubEntity);
                
                TableSchema.TableColumn colvarGeneration = new TableSchema.TableColumn(schema);
                colvarGeneration.ColumnName = "Generation";
                colvarGeneration.DataType = DbType.Int32;
                colvarGeneration.MaxLength = 0;
                colvarGeneration.AutoIncrement = false;
                colvarGeneration.IsNullable = false;
                colvarGeneration.IsPrimaryKey = false;
                colvarGeneration.IsForeignKey = false;
                colvarGeneration.IsReadOnly = false;
                
                schema.Columns.Add(colvarGeneration);
                
                TableSchema.TableColumn colvarHasModifications = new TableSchema.TableColumn(schema);
                colvarHasModifications.ColumnName = "HasModifications";
                colvarHasModifications.DataType = DbType.Boolean;
                colvarHasModifications.MaxLength = 0;
                colvarHasModifications.AutoIncrement = false;
                colvarHasModifications.IsNullable = false;
                colvarHasModifications.IsPrimaryKey = false;
                colvarHasModifications.IsForeignKey = false;
                colvarHasModifications.IsReadOnly = false;
                
                schema.Columns.Add(colvarHasModifications);
                
                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName = "CreatedOn";
                colvarCreatedOn.DataType = DbType.DateTime;
                colvarCreatedOn.MaxLength = 0;
                colvarCreatedOn.AutoIncrement = false;
                colvarCreatedOn.IsNullable = false;
                colvarCreatedOn.IsPrimaryKey = false;
                colvarCreatedOn.IsForeignKey = false;
                colvarCreatedOn.IsReadOnly = false;
                
                schema.Columns.Add(colvarCreatedOn);
                
                TableSchema.TableColumn colvarDepth = new TableSchema.TableColumn(schema);
                colvarDepth.ColumnName = "Depth";
                colvarDepth.DataType = DbType.Int32;
                colvarDepth.MaxLength = 0;
                colvarDepth.AutoIncrement = false;
                colvarDepth.IsNullable = false;
                colvarDepth.IsPrimaryKey = false;
                colvarDepth.IsForeignKey = false;
                colvarDepth.IsReadOnly = false;
                
                schema.Columns.Add(colvarDepth);
                
                TableSchema.TableColumn colvarParentNodeId = new TableSchema.TableColumn(schema);
                colvarParentNodeId.ColumnName = "ParentNodeId";
                colvarParentNodeId.DataType = DbType.Guid;
                colvarParentNodeId.MaxLength = 0;
                colvarParentNodeId.AutoIncrement = false;
                colvarParentNodeId.IsNullable = true;
                colvarParentNodeId.IsPrimaryKey = false;
                colvarParentNodeId.IsForeignKey = false;
                colvarParentNodeId.IsReadOnly = false;
                
                schema.Columns.Add(colvarParentNodeId);
                
                TableSchema.TableColumn colvarPath = new TableSchema.TableColumn(schema);
                colvarPath.ColumnName = "Path";
                colvarPath.DataType = DbType.String;
                colvarPath.MaxLength = 500;
                colvarPath.AutoIncrement = false;
                colvarPath.IsNullable = false;
                colvarPath.IsPrimaryKey = false;
                colvarPath.IsForeignKey = false;
                colvarPath.IsReadOnly = false;
                
                schema.Columns.Add(colvarPath);
                
                TableSchema.TableColumn colvarPosition = new TableSchema.TableColumn(schema);
                colvarPosition.ColumnName = "Position";
                colvarPosition.DataType = DbType.Int16;
                colvarPosition.MaxLength = 0;
                colvarPosition.AutoIncrement = false;
                colvarPosition.IsNullable = false;
                colvarPosition.IsPrimaryKey = false;
                colvarPosition.IsForeignKey = false;
                colvarPosition.IsReadOnly = false;
                
                schema.Columns.Add(colvarPosition);
                
                TableSchema.TableColumn colvarTypeId = new TableSchema.TableColumn(schema);
                colvarTypeId.ColumnName = "TypeId";
                colvarTypeId.DataType = DbType.Guid;
                colvarTypeId.MaxLength = 0;
                colvarTypeId.AutoIncrement = false;
                colvarTypeId.IsNullable = false;
                colvarTypeId.IsPrimaryKey = false;
                colvarTypeId.IsForeignKey = false;
                colvarTypeId.IsReadOnly = false;
                
                schema.Columns.Add(colvarTypeId);
                
                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName = "ModifiedOn";
                colvarModifiedOn.DataType = DbType.DateTime;
                colvarModifiedOn.MaxLength = 0;
                colvarModifiedOn.AutoIncrement = false;
                colvarModifiedOn.IsNullable = true;
                colvarModifiedOn.IsPrimaryKey = false;
                colvarModifiedOn.IsForeignKey = false;
                colvarModifiedOn.IsReadOnly = false;
                
                schema.Columns.Add(colvarModifiedOn);
                
                TableSchema.TableColumn colvarCreatedBy = new TableSchema.TableColumn(schema);
                colvarCreatedBy.ColumnName = "CreatedBy";
                colvarCreatedBy.DataType = DbType.String;
                colvarCreatedBy.MaxLength = 100;
                colvarCreatedBy.AutoIncrement = false;
                colvarCreatedBy.IsNullable = true;
                colvarCreatedBy.IsPrimaryKey = false;
                colvarCreatedBy.IsForeignKey = false;
                colvarCreatedBy.IsReadOnly = false;
                
                schema.Columns.Add(colvarCreatedBy);
                
                TableSchema.TableColumn colvarExtendedData = new TableSchema.TableColumn(schema);
                colvarExtendedData.ColumnName = "ExtendedData";
                colvarExtendedData.DataType = DbType.AnsiString;
                colvarExtendedData.MaxLength = -1;
                colvarExtendedData.AutoIncrement = false;
                colvarExtendedData.IsNullable = false;
                colvarExtendedData.IsPrimaryKey = false;
                colvarExtendedData.IsForeignKey = false;
                colvarExtendedData.IsReadOnly = false;
                
                schema.Columns.Add(colvarExtendedData);
                
                TableSchema.TableColumn colvarNickname = new TableSchema.TableColumn(schema);
                colvarNickname.ColumnName = "Nickname";
                colvarNickname.DataType = DbType.AnsiString;
                colvarNickname.MaxLength = 50;
                colvarNickname.AutoIncrement = false;
                colvarNickname.IsNullable = true;
                colvarNickname.IsPrimaryKey = false;
                colvarNickname.IsForeignKey = false;
                colvarNickname.IsReadOnly = false;
                
                schema.Columns.Add(colvarNickname);
                
                TableSchema.TableColumn colvarUser = new TableSchema.TableColumn(schema);
                colvarUser.ColumnName = "User";
                colvarUser.DataType = DbType.Guid;
                colvarUser.MaxLength = 0;
                colvarUser.AutoIncrement = false;
                colvarUser.IsNullable = true;
                colvarUser.IsPrimaryKey = false;
                colvarUser.IsForeignKey = false;
                colvarUser.IsReadOnly = false;
                
                schema.Columns.Add(colvarUser);
                
                TableSchema.TableColumn colvarUICultureName = new TableSchema.TableColumn(schema);
                colvarUICultureName.ColumnName = "UICultureName";
                colvarUICultureName.DataType = DbType.AnsiString;
                colvarUICultureName.MaxLength = 50;
                colvarUICultureName.AutoIncrement = false;
                colvarUICultureName.IsNullable = true;
                colvarUICultureName.IsPrimaryKey = false;
                colvarUICultureName.IsForeignKey = false;
                colvarUICultureName.IsReadOnly = false;
                
                schema.Columns.Add(colvarUICultureName);
                
                TableSchema.TableColumn colvarWebSiteURL = new TableSchema.TableColumn(schema);
                colvarWebSiteURL.ColumnName = "WebSiteURL";
                colvarWebSiteURL.DataType = DbType.AnsiString;
                colvarWebSiteURL.MaxLength = 500;
                colvarWebSiteURL.AutoIncrement = false;
                colvarWebSiteURL.IsNullable = true;
                colvarWebSiteURL.IsPrimaryKey = false;
                colvarWebSiteURL.IsForeignKey = false;
                colvarWebSiteURL.IsReadOnly = false;
                
                schema.Columns.Add(colvarWebSiteURL);
                
                TableSchema.TableColumn colvarNote = new TableSchema.TableColumn(schema);
                colvarNote.ColumnName = "Note";
                colvarNote.DataType = DbType.AnsiString;
                colvarNote.MaxLength = 1000;
                colvarNote.AutoIncrement = false;
                colvarNote.IsNullable = true;
                colvarNote.IsPrimaryKey = false;
                colvarNote.IsForeignKey = false;
                colvarNote.IsReadOnly = false;
                
                schema.Columns.Add(colvarNote);
                
                TableSchema.TableColumn colvarEditorToolbarMode = new TableSchema.TableColumn(schema);
                colvarEditorToolbarMode.ColumnName = "EditorToolbarMode";
                colvarEditorToolbarMode.DataType = DbType.Int32;
                colvarEditorToolbarMode.MaxLength = 0;
                colvarEditorToolbarMode.AutoIncrement = false;
                colvarEditorToolbarMode.IsNullable = true;
                colvarEditorToolbarMode.IsPrimaryKey = false;
                colvarEditorToolbarMode.IsForeignKey = false;
                colvarEditorToolbarMode.IsReadOnly = false;
                
                schema.Columns.Add(colvarEditorToolbarMode);
                
                TableSchema.TableColumn colvarExpirationDate = new TableSchema.TableColumn(schema);
                colvarExpirationDate.ColumnName = "ExpirationDate";
                colvarExpirationDate.DataType = DbType.DateTime;
                colvarExpirationDate.MaxLength = 0;
                colvarExpirationDate.AutoIncrement = false;
                colvarExpirationDate.IsNullable = true;
                colvarExpirationDate.IsPrimaryKey = false;
                colvarExpirationDate.IsForeignKey = false;
                colvarExpirationDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarExpirationDate);
                
                TableSchema.TableColumn colvarSubscriptionDate = new TableSchema.TableColumn(schema);
                colvarSubscriptionDate.ColumnName = "SubscriptionDate";
                colvarSubscriptionDate.DataType = DbType.DateTime;
                colvarSubscriptionDate.MaxLength = 0;
                colvarSubscriptionDate.AutoIncrement = false;
                colvarSubscriptionDate.IsNullable = true;
                colvarSubscriptionDate.IsPrimaryKey = false;
                colvarSubscriptionDate.IsForeignKey = false;
                colvarSubscriptionDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarSubscriptionDate);
                
                TableSchema.TableColumn colvarEnableMultiLanguageFeatures = new TableSchema.TableColumn(schema);
                colvarEnableMultiLanguageFeatures.ColumnName = "EnableMultiLanguageFeatures";
                colvarEnableMultiLanguageFeatures.DataType = DbType.Boolean;
                colvarEnableMultiLanguageFeatures.MaxLength = 0;
                colvarEnableMultiLanguageFeatures.AutoIncrement = false;
                colvarEnableMultiLanguageFeatures.IsNullable = true;
                colvarEnableMultiLanguageFeatures.IsPrimaryKey = false;
                colvarEnableMultiLanguageFeatures.IsForeignKey = false;
                colvarEnableMultiLanguageFeatures.IsReadOnly = false;
                
                schema.Columns.Add(colvarEnableMultiLanguageFeatures);
                
                TableSchema.TableColumn colvarAvatar = new TableSchema.TableColumn(schema);
                colvarAvatar.ColumnName = "Avatar";
                colvarAvatar.DataType = DbType.AnsiString;
                colvarAvatar.MaxLength = -1;
                colvarAvatar.AutoIncrement = false;
                colvarAvatar.IsNullable = true;
                colvarAvatar.IsPrimaryKey = false;
                colvarAvatar.IsForeignKey = false;
                colvarAvatar.IsReadOnly = false;
                
                schema.Columns.Add(colvarAvatar);
                
                TableSchema.TableColumn colvarLastLoginDate = new TableSchema.TableColumn(schema);
                colvarLastLoginDate.ColumnName = "LastLoginDate";
                colvarLastLoginDate.DataType = DbType.DateTime;
                colvarLastLoginDate.MaxLength = 0;
                colvarLastLoginDate.AutoIncrement = false;
                colvarLastLoginDate.IsNullable = true;
                colvarLastLoginDate.IsPrimaryKey = false;
                colvarLastLoginDate.IsForeignKey = false;
                colvarLastLoginDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarLastLoginDate);
                
                TableSchema.TableColumn colvarFullName = new TableSchema.TableColumn(schema);
                colvarFullName.ColumnName = "FullName";
                colvarFullName.DataType = DbType.AnsiString;
                colvarFullName.MaxLength = -1;
                colvarFullName.AutoIncrement = false;
                colvarFullName.IsNullable = true;
                colvarFullName.IsPrimaryKey = false;
                colvarFullName.IsForeignKey = false;
                colvarFullName.IsReadOnly = false;
                
                schema.Columns.Add(colvarFullName);
                
                TableSchema.TableColumn colvarMayManageOwnGroup = new TableSchema.TableColumn(schema);
                colvarMayManageOwnGroup.ColumnName = "MayManageOwnGroup";
                colvarMayManageOwnGroup.DataType = DbType.Boolean;
                colvarMayManageOwnGroup.MaxLength = 0;
                colvarMayManageOwnGroup.AutoIncrement = false;
                colvarMayManageOwnGroup.IsNullable = true;
                colvarMayManageOwnGroup.IsPrimaryKey = false;
                colvarMayManageOwnGroup.IsForeignKey = false;
                colvarMayManageOwnGroup.IsReadOnly = false;
                
                schema.Columns.Add(colvarMayManageOwnGroup);
                
                TableSchema.TableColumn colvarActive = new TableSchema.TableColumn(schema);
                colvarActive.ColumnName = "Active";
                colvarActive.DataType = DbType.Boolean;
                colvarActive.MaxLength = 0;
                colvarActive.AutoIncrement = false;
                colvarActive.IsNullable = true;
                colvarActive.IsPrimaryKey = false;
                colvarActive.IsForeignKey = false;
                colvarActive.IsReadOnly = false;
                
                schema.Columns.Add(colvarActive);
                
                TableSchema.TableColumn colvarMaySpecifyMedianamikLinkProtocol = new TableSchema.TableColumn(schema);
                colvarMaySpecifyMedianamikLinkProtocol.ColumnName = "MaySpecifyMedianamikLinkProtocol";
                colvarMaySpecifyMedianamikLinkProtocol.DataType = DbType.Boolean;
                colvarMaySpecifyMedianamikLinkProtocol.MaxLength = 0;
                colvarMaySpecifyMedianamikLinkProtocol.AutoIncrement = false;
                colvarMaySpecifyMedianamikLinkProtocol.IsNullable = true;
                colvarMaySpecifyMedianamikLinkProtocol.IsPrimaryKey = false;
                colvarMaySpecifyMedianamikLinkProtocol.IsForeignKey = false;
                colvarMaySpecifyMedianamikLinkProtocol.IsReadOnly = false;
                
                schema.Columns.Add(colvarMaySpecifyMedianamikLinkProtocol);
                
                TableSchema.TableColumn colvarUserId = new TableSchema.TableColumn(schema);
                colvarUserId.ColumnName = "UserId";
                colvarUserId.DataType = DbType.Guid;
                colvarUserId.MaxLength = 0;
                colvarUserId.AutoIncrement = false;
                colvarUserId.IsNullable = false;
                colvarUserId.IsPrimaryKey = false;
                colvarUserId.IsForeignKey = false;
                colvarUserId.IsReadOnly = false;
                
                schema.Columns.Add(colvarUserId);
                
                TableSchema.TableColumn colvarName = new TableSchema.TableColumn(schema);
                colvarName.ColumnName = "Name";
                colvarName.DataType = DbType.String;
                colvarName.MaxLength = 256;
                colvarName.AutoIncrement = false;
                colvarName.IsNullable = false;
                colvarName.IsPrimaryKey = false;
                colvarName.IsForeignKey = false;
                colvarName.IsReadOnly = false;
                
                schema.Columns.Add(colvarName);
                
                TableSchema.TableColumn colvarLastLockedOutDate = new TableSchema.TableColumn(schema);
                colvarLastLockedOutDate.ColumnName = "LastLockedOutDate";
                colvarLastLockedOutDate.DataType = DbType.DateTime;
                colvarLastLockedOutDate.MaxLength = 0;
                colvarLastLockedOutDate.AutoIncrement = false;
                colvarLastLockedOutDate.IsNullable = true;
                colvarLastLockedOutDate.IsPrimaryKey = false;
                colvarLastLockedOutDate.IsForeignKey = false;
                colvarLastLockedOutDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarLastLockedOutDate);
                
                TableSchema.TableColumn colvarIsLockedOut = new TableSchema.TableColumn(schema);
                colvarIsLockedOut.ColumnName = "IsLockedOut";
                colvarIsLockedOut.DataType = DbType.Boolean;
                colvarIsLockedOut.MaxLength = 0;
                colvarIsLockedOut.AutoIncrement = false;
                colvarIsLockedOut.IsNullable = false;
                colvarIsLockedOut.IsPrimaryKey = false;
                colvarIsLockedOut.IsForeignKey = false;
                colvarIsLockedOut.IsReadOnly = false;
                
                schema.Columns.Add(colvarIsLockedOut);
                
                TableSchema.TableColumn colvarPasswordQuestion = new TableSchema.TableColumn(schema);
                colvarPasswordQuestion.ColumnName = "PasswordQuestion";
                colvarPasswordQuestion.DataType = DbType.String;
                colvarPasswordQuestion.MaxLength = 256;
                colvarPasswordQuestion.AutoIncrement = false;
                colvarPasswordQuestion.IsNullable = true;
                colvarPasswordQuestion.IsPrimaryKey = false;
                colvarPasswordQuestion.IsForeignKey = false;
                colvarPasswordQuestion.IsReadOnly = false;
                
                schema.Columns.Add(colvarPasswordQuestion);
                
                TableSchema.TableColumn colvarPasswordAnswer = new TableSchema.TableColumn(schema);
                colvarPasswordAnswer.ColumnName = "PasswordAnswer";
                colvarPasswordAnswer.DataType = DbType.String;
                colvarPasswordAnswer.MaxLength = 128;
                colvarPasswordAnswer.AutoIncrement = false;
                colvarPasswordAnswer.IsNullable = true;
                colvarPasswordAnswer.IsPrimaryKey = false;
                colvarPasswordAnswer.IsForeignKey = false;
                colvarPasswordAnswer.IsReadOnly = false;
                
                schema.Columns.Add(colvarPasswordAnswer);
                
                TableSchema.TableColumn colvarComment = new TableSchema.TableColumn(schema);
                colvarComment.ColumnName = "Comment";
                colvarComment.DataType = DbType.String;
                colvarComment.MaxLength = 256;
                colvarComment.AutoIncrement = false;
                colvarComment.IsNullable = true;
                colvarComment.IsPrimaryKey = false;
                colvarComment.IsForeignKey = false;
                colvarComment.IsReadOnly = false;
                
                schema.Columns.Add(colvarComment);
                
                TableSchema.TableColumn colvarLastPasswordChangedDate = new TableSchema.TableColumn(schema);
                colvarLastPasswordChangedDate.ColumnName = "LastPasswordChangedDate";
                colvarLastPasswordChangedDate.DataType = DbType.DateTime;
                colvarLastPasswordChangedDate.MaxLength = 0;
                colvarLastPasswordChangedDate.AutoIncrement = false;
                colvarLastPasswordChangedDate.IsNullable = true;
                colvarLastPasswordChangedDate.IsPrimaryKey = false;
                colvarLastPasswordChangedDate.IsForeignKey = false;
                colvarLastPasswordChangedDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarLastPasswordChangedDate);
                
                TableSchema.TableColumn colvarIsApproved = new TableSchema.TableColumn(schema);
                colvarIsApproved.ColumnName = "IsApproved";
                colvarIsApproved.DataType = DbType.Boolean;
                colvarIsApproved.MaxLength = 0;
                colvarIsApproved.AutoIncrement = false;
                colvarIsApproved.IsNullable = false;
                colvarIsApproved.IsPrimaryKey = false;
                colvarIsApproved.IsForeignKey = false;
                colvarIsApproved.IsReadOnly = false;
                
                schema.Columns.Add(colvarIsApproved);
                
                TableSchema.TableColumn colvarLastActivityDate = new TableSchema.TableColumn(schema);
                colvarLastActivityDate.ColumnName = "LastActivityDate";
                colvarLastActivityDate.DataType = DbType.DateTime;
                colvarLastActivityDate.MaxLength = 0;
                colvarLastActivityDate.AutoIncrement = false;
                colvarLastActivityDate.IsNullable = true;
                colvarLastActivityDate.IsPrimaryKey = false;
                colvarLastActivityDate.IsForeignKey = false;
                colvarLastActivityDate.IsReadOnly = false;
                
                schema.Columns.Add(colvarLastActivityDate);
                
                TableSchema.TableColumn colvarEmail = new TableSchema.TableColumn(schema);
                colvarEmail.ColumnName = "Email";
                colvarEmail.DataType = DbType.String;
                colvarEmail.MaxLength = 256;
                colvarEmail.AutoIncrement = false;
                colvarEmail.IsNullable = false;
                colvarEmail.IsPrimaryKey = false;
                colvarEmail.IsForeignKey = false;
                colvarEmail.IsReadOnly = false;
                
                schema.Columns.Add(colvarEmail);
                
                TableSchema.TableColumn colvarPassword = new TableSchema.TableColumn(schema);
                colvarPassword.ColumnName = "Password";
                colvarPassword.DataType = DbType.String;
                colvarPassword.MaxLength = 512;
                colvarPassword.AutoIncrement = false;
                colvarPassword.IsNullable = false;
                colvarPassword.IsPrimaryKey = false;
                colvarPassword.IsForeignKey = false;
                colvarPassword.IsReadOnly = false;
                
                schema.Columns.Add(colvarPassword);
                
                TableSchema.TableColumn colvarSalt = new TableSchema.TableColumn(schema);
                colvarSalt.ColumnName = "Salt";
                colvarSalt.DataType = DbType.String;
                colvarSalt.MaxLength = 128;
                colvarSalt.AutoIncrement = false;
                colvarSalt.IsNullable = false;
                colvarSalt.IsPrimaryKey = false;
                colvarSalt.IsForeignKey = false;
                colvarSalt.IsReadOnly = false;
                
                schema.Columns.Add(colvarSalt);
                
                TableSchema.TableColumn colvarPasswordFormat = new TableSchema.TableColumn(schema);
                colvarPasswordFormat.ColumnName = "PasswordFormat";
                colvarPasswordFormat.DataType = DbType.Int32;
                colvarPasswordFormat.MaxLength = 0;
                colvarPasswordFormat.AutoIncrement = false;
                colvarPasswordFormat.IsNullable = false;
                colvarPasswordFormat.IsPrimaryKey = false;
                colvarPasswordFormat.IsForeignKey = false;
                colvarPasswordFormat.IsReadOnly = false;
                
                schema.Columns.Add(colvarPasswordFormat);
                
                
                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["CodeGenerationProvider"].AddSchema("vw_UserProfile",schema);
            }
        }
        #endregion
        
        #region Query Accessor
	    public static Query CreateQuery()
	    {
		    return new Query(Schema);
	    }
	    #endregion
	    
	    #region .ctors
	    public UserProfile()
	    {
            SetSQLProps();
            SetDefaults();
            MarkNew();
        }
        public UserProfile(bool useDatabaseDefaults)
	    {
		    SetSQLProps();
		    if(useDatabaseDefaults)
		    {
				ForceDefaults();
			}
			MarkNew();
	    }
	    
	    public UserProfile(object keyID)
	    {
		    SetSQLProps();
		    LoadByKey(keyID);
	    }
    	 
	    public UserProfile(string columnName, object columnValue)
        {
            SetSQLProps();
            LoadByParam(columnName,columnValue);
        }
        
	    #endregion
	    
	    #region Props
	    
          
        [XmlAttribute("Id")]
        [Bindable(true)]
        public Guid Id 
	    {
		    get
		    {
			    return GetColumnValue<Guid>("Id");
		    }
            set 
		    {
			    SetColumnValue("Id", value);
            }
        }
	      
        [XmlAttribute("NodeId")]
        [Bindable(true)]
        public Guid NodeId 
	    {
		    get
		    {
			    return GetColumnValue<Guid>("NodeId");
		    }
            set 
		    {
			    SetColumnValue("NodeId", value);
            }
        }
	      
        [XmlAttribute("Revision")]
        [Bindable(true)]
        public int? Revision 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Revision");
		    }
            set 
		    {
			    SetColumnValue("Revision", value);
            }
        }
	      
        [XmlAttribute("CultureName")]
        [Bindable(true)]
        public string CultureName 
	    {
		    get
		    {
			    return GetColumnValue<string>("CultureName");
		    }
            set 
		    {
			    SetColumnValue("CultureName", value);
            }
        }
	      
        [XmlAttribute("IsActive")]
        [Bindable(true)]
        public bool IsActive 
	    {
		    get
		    {
			    return GetColumnValue<bool>("IsActive");
		    }
            set 
		    {
			    SetColumnValue("IsActive", value);
            }
        }
	      
        [XmlAttribute("IsSubEntity")]
        [Bindable(true)]
        public bool IsSubEntity 
	    {
		    get
		    {
			    return GetColumnValue<bool>("IsSubEntity");
		    }
            set 
		    {
			    SetColumnValue("IsSubEntity", value);
            }
        }
	      
        [XmlAttribute("Generation")]
        [Bindable(true)]
        public int Generation 
	    {
		    get
		    {
			    return GetColumnValue<int>("Generation");
		    }
            set 
		    {
			    SetColumnValue("Generation", value);
            }
        }
	      
        [XmlAttribute("HasModifications")]
        [Bindable(true)]
        public bool HasModifications 
	    {
		    get
		    {
			    return GetColumnValue<bool>("HasModifications");
		    }
            set 
		    {
			    SetColumnValue("HasModifications", value);
            }
        }
	      
        [XmlAttribute("CreatedOn")]
        [Bindable(true)]
        public DateTime CreatedOn 
	    {
		    get
		    {
			    return GetColumnValue<DateTime>("CreatedOn");
		    }
            set 
		    {
			    SetColumnValue("CreatedOn", value);
            }
        }
	      
        [XmlAttribute("Depth")]
        [Bindable(true)]
        public int Depth 
	    {
		    get
		    {
			    return GetColumnValue<int>("Depth");
		    }
            set 
		    {
			    SetColumnValue("Depth", value);
            }
        }
	      
        [XmlAttribute("ParentNodeId")]
        [Bindable(true)]
        public Guid? ParentNodeId 
	    {
		    get
		    {
			    return GetColumnValue<Guid?>("ParentNodeId");
		    }
            set 
		    {
			    SetColumnValue("ParentNodeId", value);
            }
        }
	      
        [XmlAttribute("Path")]
        [Bindable(true)]
        public string Path 
	    {
		    get
		    {
			    return GetColumnValue<string>("Path");
		    }
            set 
		    {
			    SetColumnValue("Path", value);
            }
        }
	      
        [XmlAttribute("Position")]
        [Bindable(true)]
        public short Position 
	    {
		    get
		    {
			    return GetColumnValue<short>("Position");
		    }
            set 
		    {
			    SetColumnValue("Position", value);
            }
        }
	      
        [XmlAttribute("TypeId")]
        [Bindable(true)]
        public Guid TypeId 
	    {
		    get
		    {
			    return GetColumnValue<Guid>("TypeId");
		    }
            set 
		    {
			    SetColumnValue("TypeId", value);
            }
        }
	      
        [XmlAttribute("ModifiedOn")]
        [Bindable(true)]
        public DateTime? ModifiedOn 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("ModifiedOn");
		    }
            set 
		    {
			    SetColumnValue("ModifiedOn", value);
            }
        }
	      
        [XmlAttribute("CreatedBy")]
        [Bindable(true)]
        public string CreatedBy 
	    {
		    get
		    {
			    return GetColumnValue<string>("CreatedBy");
		    }
            set 
		    {
			    SetColumnValue("CreatedBy", value);
            }
        }
	      
        [XmlAttribute("ExtendedData")]
        [Bindable(true)]
        public string ExtendedData 
	    {
		    get
		    {
			    return GetColumnValue<string>("ExtendedData");
		    }
            set 
		    {
			    SetColumnValue("ExtendedData", value);
            }
        }
	      
        [XmlAttribute("Nickname")]
        [Bindable(true)]
        public string Nickname 
	    {
		    get
		    {
			    return GetColumnValue<string>("Nickname");
		    }
            set 
		    {
			    SetColumnValue("Nickname", value);
            }
        }
	      
        [XmlAttribute("User")]
        [Bindable(true)]
        public Guid? User 
	    {
		    get
		    {
			    return GetColumnValue<Guid?>("User");
		    }
            set 
		    {
			    SetColumnValue("User", value);
            }
        }
	      
        [XmlAttribute("UICultureName")]
        [Bindable(true)]
        public string UICultureName 
	    {
		    get
		    {
			    return GetColumnValue<string>("UICultureName");
		    }
            set 
		    {
			    SetColumnValue("UICultureName", value);
            }
        }
	      
        [XmlAttribute("WebSiteURL")]
        [Bindable(true)]
        public string WebSiteURL 
	    {
		    get
		    {
			    return GetColumnValue<string>("WebSiteURL");
		    }
            set 
		    {
			    SetColumnValue("WebSiteURL", value);
            }
        }
	      
        [XmlAttribute("Note")]
        [Bindable(true)]
        public string Note 
	    {
		    get
		    {
			    return GetColumnValue<string>("Note");
		    }
            set 
		    {
			    SetColumnValue("Note", value);
            }
        }
	      
        [XmlAttribute("EditorToolbarMode")]
        [Bindable(true)]
        public int? EditorToolbarMode 
	    {
		    get
		    {
			    return GetColumnValue<int?>("EditorToolbarMode");
		    }
            set 
		    {
			    SetColumnValue("EditorToolbarMode", value);
            }
        }
	      
        [XmlAttribute("ExpirationDate")]
        [Bindable(true)]
        public DateTime? ExpirationDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("ExpirationDate");
		    }
            set 
		    {
			    SetColumnValue("ExpirationDate", value);
            }
        }
	      
        [XmlAttribute("SubscriptionDate")]
        [Bindable(true)]
        public DateTime? SubscriptionDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("SubscriptionDate");
		    }
            set 
		    {
			    SetColumnValue("SubscriptionDate", value);
            }
        }
	      
        [XmlAttribute("EnableMultiLanguageFeatures")]
        [Bindable(true)]
        public bool? EnableMultiLanguageFeatures 
	    {
		    get
		    {
			    return GetColumnValue<bool?>("EnableMultiLanguageFeatures");
		    }
            set 
		    {
			    SetColumnValue("EnableMultiLanguageFeatures", value);
            }
        }
	      
        [XmlAttribute("Avatar")]
        [Bindable(true)]
        public string Avatar 
	    {
		    get
		    {
			    return GetColumnValue<string>("Avatar");
		    }
            set 
		    {
			    SetColumnValue("Avatar", value);
            }
        }
	      
        [XmlAttribute("LastLoginDate")]
        [Bindable(true)]
        public DateTime? LastLoginDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("LastLoginDate");
		    }
            set 
		    {
			    SetColumnValue("LastLoginDate", value);
            }
        }
	      
        [XmlAttribute("FullName")]
        [Bindable(true)]
        public string FullName 
	    {
		    get
		    {
			    return GetColumnValue<string>("FullName");
		    }
            set 
		    {
			    SetColumnValue("FullName", value);
            }
        }
	      
        [XmlAttribute("MayManageOwnGroup")]
        [Bindable(true)]
        public bool? MayManageOwnGroup 
	    {
		    get
		    {
			    return GetColumnValue<bool?>("MayManageOwnGroup");
		    }
            set 
		    {
			    SetColumnValue("MayManageOwnGroup", value);
            }
        }
	      
        [XmlAttribute("Active")]
        [Bindable(true)]
        public bool? Active 
	    {
		    get
		    {
			    return GetColumnValue<bool?>("Active");
		    }
            set 
		    {
			    SetColumnValue("Active", value);
            }
        }
	      
        [XmlAttribute("MaySpecifyMedianamikLinkProtocol")]
        [Bindable(true)]
        public bool? MaySpecifyMedianamikLinkProtocol 
	    {
		    get
		    {
			    return GetColumnValue<bool?>("MaySpecifyMedianamikLinkProtocol");
		    }
            set 
		    {
			    SetColumnValue("MaySpecifyMedianamikLinkProtocol", value);
            }
        }
	      
        [XmlAttribute("UserId")]
        [Bindable(true)]
        public Guid UserId 
	    {
		    get
		    {
			    return GetColumnValue<Guid>("UserId");
		    }
            set 
		    {
			    SetColumnValue("UserId", value);
            }
        }
	      
        [XmlAttribute("Name")]
        [Bindable(true)]
        public string Name 
	    {
		    get
		    {
			    return GetColumnValue<string>("Name");
		    }
            set 
		    {
			    SetColumnValue("Name", value);
            }
        }
	      
        [XmlAttribute("LastLockedOutDate")]
        [Bindable(true)]
        public DateTime? LastLockedOutDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("LastLockedOutDate");
		    }
            set 
		    {
			    SetColumnValue("LastLockedOutDate", value);
            }
        }
	      
        [XmlAttribute("IsLockedOut")]
        [Bindable(true)]
        public bool IsLockedOut 
	    {
		    get
		    {
			    return GetColumnValue<bool>("IsLockedOut");
		    }
            set 
		    {
			    SetColumnValue("IsLockedOut", value);
            }
        }
	      
        [XmlAttribute("PasswordQuestion")]
        [Bindable(true)]
        public string PasswordQuestion 
	    {
		    get
		    {
			    return GetColumnValue<string>("PasswordQuestion");
		    }
            set 
		    {
			    SetColumnValue("PasswordQuestion", value);
            }
        }
	      
        [XmlAttribute("PasswordAnswer")]
        [Bindable(true)]
        public string PasswordAnswer 
	    {
		    get
		    {
			    return GetColumnValue<string>("PasswordAnswer");
		    }
            set 
		    {
			    SetColumnValue("PasswordAnswer", value);
            }
        }
	      
        [XmlAttribute("Comment")]
        [Bindable(true)]
        public string Comment 
	    {
		    get
		    {
			    return GetColumnValue<string>("Comment");
		    }
            set 
		    {
			    SetColumnValue("Comment", value);
            }
        }
	      
        [XmlAttribute("LastPasswordChangedDate")]
        [Bindable(true)]
        public DateTime? LastPasswordChangedDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("LastPasswordChangedDate");
		    }
            set 
		    {
			    SetColumnValue("LastPasswordChangedDate", value);
            }
        }
	      
        [XmlAttribute("IsApproved")]
        [Bindable(true)]
        public bool IsApproved 
	    {
		    get
		    {
			    return GetColumnValue<bool>("IsApproved");
		    }
            set 
		    {
			    SetColumnValue("IsApproved", value);
            }
        }
	      
        [XmlAttribute("LastActivityDate")]
        [Bindable(true)]
        public DateTime? LastActivityDate 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("LastActivityDate");
		    }
            set 
		    {
			    SetColumnValue("LastActivityDate", value);
            }
        }
	      
        [XmlAttribute("Email")]
        [Bindable(true)]
        public string Email 
	    {
		    get
		    {
			    return GetColumnValue<string>("Email");
		    }
            set 
		    {
			    SetColumnValue("Email", value);
            }
        }
	      
        [XmlAttribute("Password")]
        [Bindable(true)]
        public string Password 
	    {
		    get
		    {
			    return GetColumnValue<string>("Password");
		    }
            set 
		    {
			    SetColumnValue("Password", value);
            }
        }
	      
        [XmlAttribute("Salt")]
        [Bindable(true)]
        public string Salt 
	    {
		    get
		    {
			    return GetColumnValue<string>("Salt");
		    }
            set 
		    {
			    SetColumnValue("Salt", value);
            }
        }
	      
        [XmlAttribute("PasswordFormat")]
        [Bindable(true)]
        public int PasswordFormat 
	    {
		    get
		    {
			    return GetColumnValue<int>("PasswordFormat");
		    }
            set 
		    {
			    SetColumnValue("PasswordFormat", value);
            }
        }
	    
	    #endregion
    
	    #region Columns Struct
	    public struct Columns
	    {
		    
		    
            public static string Id = @"Id";
            
            public static string NodeId = @"NodeId";
            
            public static string Revision = @"Revision";
            
            public static string CultureName = @"CultureName";
            
            public static string IsActive = @"IsActive";
            
            public static string IsSubEntity = @"IsSubEntity";
            
            public static string Generation = @"Generation";
            
            public static string HasModifications = @"HasModifications";
            
            public static string CreatedOn = @"CreatedOn";
            
            public static string Depth = @"Depth";
            
            public static string ParentNodeId = @"ParentNodeId";
            
            public static string Path = @"Path";
            
            public static string Position = @"Position";
            
            public static string TypeId = @"TypeId";
            
            public static string ModifiedOn = @"ModifiedOn";
            
            public static string CreatedBy = @"CreatedBy";
            
            public static string ExtendedData = @"ExtendedData";
            
            public static string Nickname = @"Nickname";
            
            public static string User = @"User";
            
            public static string UICultureName = @"UICultureName";
            
            public static string WebSiteURL = @"WebSiteURL";
            
            public static string Note = @"Note";
            
            public static string EditorToolbarMode = @"EditorToolbarMode";
            
            public static string ExpirationDate = @"ExpirationDate";
            
            public static string SubscriptionDate = @"SubscriptionDate";
            
            public static string EnableMultiLanguageFeatures = @"EnableMultiLanguageFeatures";
            
            public static string Avatar = @"Avatar";
            
            public static string LastLoginDate = @"LastLoginDate";
            
            public static string FullName = @"FullName";
            
            public static string MayManageOwnGroup = @"MayManageOwnGroup";
            
            public static string Active = @"Active";
            
            public static string MaySpecifyMedianamikLinkProtocol = @"MaySpecifyMedianamikLinkProtocol";
            
            public static string UserId = @"UserId";
            
            public static string Name = @"Name";
            
            public static string LastLockedOutDate = @"LastLockedOutDate";
            
            public static string IsLockedOut = @"IsLockedOut";
            
            public static string PasswordQuestion = @"PasswordQuestion";
            
            public static string PasswordAnswer = @"PasswordAnswer";
            
            public static string Comment = @"Comment";
            
            public static string LastPasswordChangedDate = @"LastPasswordChangedDate";
            
            public static string IsApproved = @"IsApproved";
            
            public static string LastActivityDate = @"LastActivityDate";
            
            public static string Email = @"Email";
            
            public static string Password = @"Password";
            
            public static string Salt = @"Salt";
            
            public static string PasswordFormat = @"PasswordFormat";
            
	    }
	    #endregion
	    
	    
	    #region IAbstractRecord Members
        public new CT GetColumnValue<CT>(string columnName) {
            return base.GetColumnValue<CT>(columnName);
        }
        public object GetColumnValue(string columnName) {
            return base.GetColumnValue<object>(columnName);
        }
        #endregion
	    
    }
}
